package com.wsd.constant;

import com.wsd.constant.RepaymentTypeEnum;

/**
 * @author Wan Yucan
 * @date 2020/7/30-14:51
 */
public enum RepaymentPlanStatusEnum {
    //未还款
    NOT_REPAYMENT(0,"0"),
    //已还款
    ALREADY_REPAYMENT(1,"1"),
    //逾期
    OVERDUE(2,"2"),
    //作废
    NULLIFIED(3,"3");

    private  int value;
    private String type;
    RepaymentPlanStatusEnum(int value,String type) {
        this.type = type;
        this.value=value;
    }

    public int getValue() {
        return value;
    }

    public String getType(){
        return type;
    }

    public static RepaymentTypeEnum getType(String type){
        for (RepaymentTypeEnum enums : RepaymentTypeEnum.values()) {
            if (type.equals(enums.getType())) {
                return enums;
            }
        }
        return null;
    }

}

